{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "GEN_3_over_under.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyM07leLbP62DX28GqJwYTH2",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/cxbxmxcx/GenReality/blob/master/GEN_3_over_under.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "XhB46Q8JTpBd"
      },
      "source": [
        "from sklearn.model_selection import train_test_split\n",
        "\n",
        "import numpy  as np\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "import torch\n",
        "import torch.nn as nn"
      ],
      "execution_count": 86,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "9ITk0PPQb67p"
      },
      "source": [
        "def function(X):\n",
        "  return X * X + 5."
      ],
      "execution_count": 60,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "tNHQgiXUUFIa",
        "outputId": "85c9b2db-bb87-45c2-bb5f-f458e8993344",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 283
        }
      },
      "source": [
        "data_step = .1\n",
        "X = np.reshape(np.arange(1,10, data_step), (-1, 1))\n",
        "y = function(X)\n",
        "inputs = X.shape[1]\n",
        "plt.plot(X, y, 'o', color='red')"
      ],
      "execution_count": 94,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x7fcc0f427cc0>]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 94
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAA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432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "z05ZyUrmU7is",
        "outputId": "120e1941-e23f-4e30-9fa5-e494c0d338a5",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        }
      },
      "source": [
        "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n",
        "num_train = X_train.shape[0]\n",
        "X_train[:2], y_train[:2]\n",
        "num_train"
      ],
      "execution_count": 88,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "72"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 88
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "QLshQolGVUlz"
      },
      "source": [
        "neurons = 20\n",
        "torch.set_default_dtype(torch.float64)\n",
        "net = nn.Sequential(\n",
        "    nn.Linear(inputs, neurons, bias = True), nn.ReLU(),    \n",
        "    nn.Linear(neurons, neurons, bias = True), nn.Sigmoid(),\n",
        "    nn.Linear(neurons, 1)\n",
        ")\n",
        "loss_fn = nn.MSELoss()\n",
        "optimizer = torch.optim.Adam(net.parameters(), lr = .01)"
      ],
      "execution_count": 89,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ZhR9h8Y3WCWM"
      },
      "source": [
        "num_epochs = 1000\n",
        "y_train_t = torch.from_numpy(y_train).clone().reshape(-1, 1)\n",
        "x_train_t = torch.from_numpy(X_train).clone()\n",
        "y_test_t = torch.from_numpy(y_test).clone().reshape(-1, 1)\n",
        "x_test_t = torch.from_numpy(X_test).clone()\n",
        "history = []"
      ],
      "execution_count": 90,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Ef62jrN3WP0d",
        "outputId": "0629eaf8-ce54-4f0b-a701-b179cca958ca",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 173
        }
      },
      "source": [
        "for i in range(num_epochs):\n",
        "    y_pred = net(x_train_t)\n",
        "    loss = loss_fn(y_train_t,y_pred)\n",
        "    history.append(loss.data)    \n",
        "    loss.backward()\n",
        "    optimizer.step()\n",
        "    optimizer.zero_grad()  \n",
        "    test_loss = loss_fn(y_test_t,net(x_test_t))  \n",
        "    if i > 0 and i % 100 == 0:\n",
        "        print(f'Epoch {i}, loss = {loss:.3f}, test loss {test_loss:.3f}')"
      ],
      "execution_count": 91,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Epoch 100, loss = 1553.457, test loss 1026.763\n",
            "Epoch 200, loss = 867.553, test loss 553.794\n",
            "Epoch 300, loss = 504.587, test loss 326.067\n",
            "Epoch 400, loss = 304.647, test loss 205.740\n",
            "Epoch 500, loss = 189.167, test loss 137.230\n",
            "Epoch 600, loss = 120.196, test loss 95.958\n",
            "Epoch 700, loss = 78.507, test loss 68.833\n",
            "Epoch 800, loss = 52.620, test loss 50.392\n",
            "Epoch 900, loss = 35.970, test loss 37.792\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "IifIajH-XFrl",
        "outputId": "63647779-ec3f-4f63-ceea-88a5c5abfb25",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 283
        }
      },
      "source": [
        "plt.plot(history)"
      ],
      "execution_count": 92,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x7fcc0f11e2b0>]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 92
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXQc5Z3u8e+vW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zlt+MBkN1AL/7R3SetTMMojj7eycqwJ+AOwBqglvtwWvpKAAAAHxSURBVFXE93bu0tPt2qftHY+hH/fMLBN4DviGc64+cp4L7/rjph+umV0DHHDOrfK7lihKAs4HHnLOnQcc572f/EBcbudc4FrCO7yRQAanHgaJe9HYrvEY+nH9SEYzCxEO/Medc7/1mmvMrNCbXwgc8Nrj4d/iYuDTZrYLeJLwIZ6fAEPMrOt5EJHrdWKdvfk5wKFoFtwPKoFK59xb3vSzhHcC8bydLwd2OudqnXNtwG8Jb/t43s5derpd+7S94zH04/aRjGZmwM+BTc65H0XMWgR0ncGfR/hYf1f7l7xeALOBuoifkYOCc+5e51yxc66U8LZ82Tn3eeAV4EZvsZPXuevf4kZv+UH1jdg5tx/Ya2YTvaZPABuJ4+1M+LDObDNL9/6fd61z3G7nCD3drsuAK80s1/uFdKXX1j1+n9QYoBMlVwNbge3AP/hdTz+u1yWEf/qtBdZ4w9WEj2UuB7YBLwF53vJGuCfTdmAd4Z4Rvq9HH9b/Y8Bi7/UY4G2gAngGSPHaU73pCm/+GL/r7uW6TgfKvW39OyA33rcz8P+AzcB64FdASrxtZ+AJwucs2gj/oru9N9sVuM1b9wrgKz2pQbdhEBFJIPF4eEdERE5DoS8ikkAU+iIiCUShLyKSQBT6IiIJRKEvIpJAFPoiIgnk/wMvmFz8FJMtsgAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ZJXQixjLhDkt",
        "outputId": "0a52500b-b259-4a0a-c8b6-ada2ea5fa6f9",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 283
        }
      },
      "source": [
        "X_a = torch.rand(100,1).clone() * 9\n",
        "y_a = net(X_a)\n",
        "y_a = y_a.detach().numpy()\n",
        "plt.plot(X_a, y_a, 'o', color='black')"
      ],
      "execution_count": 93,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x7fcc0f0ff5f8>]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 93
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAZeUlEQVR4nO3db2xb53XH8e8RJaGl3C4xpRleXFMZGrTIBjRdhCJdhqGL06FriyUviqCF1AppANnS1rn7gzWbXgx7IaAFhnV+MdsVmmyqedemyFIkKIpuiZdiQF94lZOu/9yhWSa6zpzYlpM2tYHZls5e6FKhpEvyUiJ57yV/H0AQee8lecDEx4/PPc/zmLsjIiLZ05d0ACIisj1K4CIiGaUELiKSUUrgIiIZpQQuIpJR/Z38sOHhYR8dHe3kR4qIZN7p06cvufvI5uMdTeCjo6MsLi528iNFRDLPzMpRx1VCERHJKCVwEZGMUgIXEckoJXARkYyKlcDN7I/N7Idm9gMz+7KZvcnMbjWzU2b2gpk9ZmaD7Q5WRETe0DCBm9ktwB8BY+7+60AO+CjwOeDz7v524FXgoXYGKiKSNUEQMDo6Sl9fH6OjowRB0NL3j1tC6QfebGb9QB44D9wDPB6eXwDub2lkIiIZFQQBu3btYmJignK5jLtTLpeZmppqaRJvmMDd/SXgb4CzrCXunwGngdfc/UZ42TnglqjXm9mUmS2a2eLFixdbE7WISEoFQcAnP/lJrly5suXc1atXmZ2dbdlnxSmh3AzcB9wK/AowBHwg7ge4+7y7j7n72MjIlolEIiJdZXZ2lmvXrtU8f/bs2ZZ9VpwSyr3A/7j7RXe/DjwB3A3cFJZUAPYBL7UsKhGRjGqUoPfv39+yz4qTwM8Cd5lZ3swMOAD8CHgW+Eh4zST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uMbNSsiGlwjngnLtX/oX2OGsJvZfdC/yPu1909+vAE8BvJhzTtqU9gX8HuM3MbjWzQdZuNjyVcEyJsrVt7x8Bzrj73yYdTxq4+1+4+z53H2Xt/5F/c/fMjqpaxd1fBn5qZu8IDx0AfpRgSGlwFrjLzPLhn6UDZPjGbn/SAdTj7jfM7A+Bf2HtbvGj7v7DhMNK2t3Ax4Hvm9l3w2N/6e7fSDAmSa9PAUE4AHoReDDheBLl7qfM7HHgOdY6up4nw9PqNZVeRCSj0l5CERGRGpTARUQySglcRCSjlMBFRDJKCVxEJKOUwEVEMkoJXEQko/4f41PU5etD3o0AAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    }
  ]
}